<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的信息</title>
    <link href="res/static/css/main.css" rel="stylesheet" type="text/css">
    <link href="res/layui/css/layui.css" rel="stylesheet" type="text/css">
    <script src="res/layui/layui.js" type="text/javascript"></script>
    <link href="res/static/iconfont/iconfont.css" rel="stylesheet">
    <script src="res/static/js/util/jquery-3.3.1.min.js" type="text/javascript"></script>
    <script src="res/static/js/util/jquery.cookie.js" type="text/javascript"></script>
    <script src="res/static/iconfont/iconfont.js"></script>
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
          name="viewport">
    <meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible">
</head>
<body>

<div class="site-nav-bg">
    <div class="site-nav w1200">
        <p class="sn-back-home">
            <i class="layui-icon layui-icon-home"></i>
            <a href="index.html">首页</a>
        </p>
        <div class="sn-quick-menu">
            <div class="login"><a href="=UserLogOut">退出</a></div>
        </div>
    </div>
</div>


<div class="header">
    <div class="headerLayout w1200">
        <div class="headerCon">
            <h1 class="mallLogo">
                <a href="index.html" title="极品商城">
                    <img src="res/static/img/logo.png">
                </a>
            </h1>
        </div>
    </div>
</div>


<div class="layui-tab-wrap">
    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
        <ul class="layui-tab-title">
            <li class="layui-this" style="font-size: 20px;">我的信息</li>
            <li style="font-size: 20px;">消息通知</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show layui-tab-item1">
                <div><img id="img" src=""></div>

                <div class="layui-tab-item1-info">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">用户ID</label>
                            <div class="layui-input-inline">
                                <label class="layui-form-label" id="id" name="userid" style="text-align: left;"></label>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">手机号</label>
                            <div class="layui-input-inline">
                                <label class="layui-form-label" id="phone" name="phone"
                                       style="text-align: left;"></label>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">姓名</label>
                            <div class="layui-input-inline">
                                <label class="layui-form-label" id="username" name="username"
                                       style="text-align: left;"></label>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">邮箱</label>
                            <div class="layui-input-inline">
                                <label class="layui-form-label" id="email" name="email"
                                       style="text-align: left;"></label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item layui-tab-item2" id="layui-tab-item2">
                <hr>
                <div class="layui-tab-item2-info">
                    <div class="item2-info-title"><h2>你有一份待领取礼物</h2></div>
                    <div class="item2-info-time">2019-10-21 10：10</div>
                    <div><span>暴力女会计师V刊是你内存卡顺口看见啦吃亏了亏损vs电脑开机难看；能看见你了看你空间</span></div>
                </div>
                <hr>
                <div class="layui-tab-item2-info">
                    <div class="item2-info-title"><h2>你有一份待领取礼物</h2></div>
                    <div class="item2-info-time">2019-10-21 10：10</div>
                    <div><span>暴力女会计师V刊是你内存卡顺口看见啦吃亏了亏损vs电脑开机难看；能看见你了看你空间</span></div>
                </div>
                <hr>
                <div class="layui-tab-item2-info">
                    <div class="item2-info-title"><h2>你有一份待领取礼物</h2></div>
                    <div class="item2-info-time">2019-10-21 10：10</div>
                    <div><span>暴力女会计师V刊是你内存卡顺口看见啦吃亏了亏损vs电脑开机难看；能看见你了看你空间</span></div>
                </div>
                <hr>
            </div>
        </div>
    </div>
</div>


<div class="footer">
    <div class="ng-promise-box">
        <div class="ng-promise w1200">
            <p class="text">
                <a class="icon1" href="javascript:">7天无理由退换货</a>
                <a class="icon2" href="javascript:">满99元全场免邮</a>
                <a class="icon3" href="javascript:" style="margin-right: 0">100%品质保证</a>
            </p>
        </div>
    </div>
    <div class="mod_help w1200">
        <p>
            <a href="javascript:">关于我们</a>
            <span>|</span>
            <a href="javascript:">帮助中心</a>
            <span>|</span>
            <a href="javascript:">售后服务</a>
            <span>|</span>
            <a href="javascript:">极品资讯</a>
            <span>|</span>
            <a href="javascript:">关于货源</a>
        </p>
        <p class="coty">极品商城版权所有 &copy; 2012-2020</p>
    </div>
</div>


<script type="text/javascript">
    $(function () {
        var userTel = $.cookie("userTel");
        $.ajax({
            url: "userInfo",
            type: "post",
            data: {"userTel": userTel},
            dataType: "json",
            success: function (data) {
                $("#img").prop("src", data.avatarPath);
                $("#id").html(data.userId);
                $("#phone").html(data.tel);
                $("#username").html(data.userName);
                $("#email").html(data.email);
            }
        });
    })
</script>

<script>
    layui.use('element', function () {
        var $ = layui.jquery
            , element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块


        $('.site-demo-active').on('click', function () {
            var othis = $(this), type = othis.data('type');
            active[type] ? active[type].call(this, othis) : '';
        });


    });
</script>


<!--<script type="text/javascript">

  layui.define(['layer'],function(exports){
  var layer = layui.layer;
  $(".modify-hader").click(function(){
     layer.open({
        title:'修改头像',
        content: '<div class="layui-upload">'+
                  '<button type="button" class="layui-btn" id="test1">上传图片</button>'+
                  '<div class="layui-upload-list">'+
                  '<img class="layui-upload-img" id="demo1" style="width:100px;height:100px">'+
                  '<p id="demoText"></p></div></div>',
        yes: function(index, layero){
        //do something
        var username = $(".new-username").val();
        alert(username);

        $.ajax({
            url : "#",
            type : "post",
            data : {"username":username },
            success : function(data) {
                $(".username").val(username);
             }
        });

        layer.close(index); //如果设定了yes回调，需进行手工关闭
        }
      });
     //处理文件上传
      layui.use('upload', function(){
        var $ = layui.jquery
        ,upload = layui.upload;
        
        //普通图片上传
        var uploadInst = upload.render({
          elem: '#test1'
          ,url: ''
          ,before: function(obj){
            //预读本地文件示例，不支持ie8
            obj.preview(function(index, file, result){
              $('#demo1').attr('src', result); //图片链接（base64）
            });
          }
          ,done: function(res){
            //如果上传失败
            if(res.code > 0){
              return layer.msg('上传失败');
            }
            //上传成功
          }
          ,error: function(){
            //演示失败状态，并实现重传
            var demoText = $('#demoText');
            demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
            demoText.find('.demo-reload').on('click', function(){
              uploadInst.upload();
            });
          }
        });

      });

    });

  $(".modify-username").click(function(){
     layer.open({
        title:'修改姓名',
        content: '<input type="text" name="new-username"  class="layui-input new-username">',
        yes: function(index, layero){
        //do something
        var username = $(".new-username").val();

        $.ajax({
            url : "#",
            type : "post",
            data : {"username":username },
            success : function(data) {
                $(".username").val(username);
             }
        });

        layer.close(index); //如果设定了yes回调，需进行手工关闭
        }
      });        
    });

  $(".modify-email").click(function(){
     layer.open({
        title:'请先验证密码',
        content: '<input type="text" name="email-password"  class="layui-input email-password">',
        yes: function(index, layero){
        //do something
        var email_password = $(".email-password").val();
        $.ajax({
            url : "#",
            type : "post",
            data : {"email_password":email_password },
            success : function(data) {
                if(data.reslut)
                {
                   layer.open({
                    title:'修改邮箱',
                    content: '<input type="text" name="new-email"  class="layui-input new-email">',
                    yes: function(index, layero){
                    //do something
                    var email = $(".new-email").val();
                    $.ajax({
                        url : "#",
                        type : "post",
                        data : {"email":email },
                        success : function(data) {
                            $(".email").val(email);
                         }
                    });
                    layer.close(index); //如果设定了yes回调，需进行手工关闭
                    }
                  });        
                }
                else
                  layer.msg("密码错误");
             }
        });
        layer.close(index); //如果设定了yes回调，需进行手工关闭
        }
      });        
    });

  $(".modify-password").click(function(){
     layer.open({
        title:'请先验证密码',
        content: '<input type="text" name="password-password"  class="layui-input password-password">',
        yes: function(index, layero){
        //do something
        var password_password = $(".password-password").val();
        $.ajax({
            url : "#",
            type : "post",
            data : {"password_password":password_password },
            success : function(data) {
                if(data.reslut)
                {
                   layer.open({
                    title:'修改密码',
                    content: '<input type="text" name="new-password"  class="layui-input new-password">',
                    yes: function(index, layero){
                    //do something
                    var password = $(".new-password").val();
                    $.ajax({
                        url : "#",
                        type : "post",
                        data : {"password":password },
                        success : function(data) {
                            $(".password").val(password);
                         }
                    });
                    layer.close(index); //如果设定了yes回调，需进行手工关闭
                    }
                  });        
                }
                else
                    layer.msg("密码错误");
             }
        });
        layer.close(index); //如果设定了yes回调，需进行手工关闭
        }
      });        
    })
});

</script>-->

</body>
</html>